package com.jxc.service.impl;

import com.jxc.mapper.LogMapper;
import com.jxc.pojo.Log;
import com.jxc.pojo.LogExample;
import com.jxc.service.LogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class LogServiceImpl implements LogService {
    @Resource
    private LogMapper logMapper;
    @Override
    public int deleteByExample(Integer lid) {
        LogExample logExample = new LogExample();
        logExample.createCriteria().andUserIdEqualTo(lid);
        return logMapper.deleteByExample(logExample);
    }

    @Override
    public int delLog(Integer userId) {
        return logMapper.delLog(userId);
    }

    @Override
    public int insert(Log record) {
        System.out.println("----保存日志----");
        return logMapper.insert(record);
    }

}
